#region Using
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
#endregion Using

namespace CY.GFive.Core.Business
{
	public class Course : Business.BusinessBase<Course, int>
	{
		#region Fields and Properties

		private int courseScore = 0;
		/// <summary>
		/// 
		/// </summary>
		public int CourseScore
		{
			get { return courseScore; }
			set
			{
				if (value != courseScore)
				{
					MarkChanged("CourseScore");
					courseScore = value;
				}
			}
		}

		private int courseNum = 0;
		/// <summary>
		/// 
		/// </summary>
		public int CourseNum
		{
			get { return courseNum; }
			set
			{
				if (value != courseNum)
				{
					MarkChanged("CourseNum");
					courseNum = value;
				}
			}
		}

		private String des = String.Empty;
		/// <summary>
		/// 
		/// </summary>
		public String Des
		{
			get { return des; }
			set
			{
				if (value != des)
				{
					MarkChanged("Des");
					des = value;
				}
			}
		}

		private String name = String.Empty;
		/// <summary>
		/// 
		/// </summary>
		public String Name
		{
			get { return name; }
			set
			{
				if (value != name)
				{
					MarkChanged("Name");
					name = value;
				}
			}
		}

		private String code = String.Empty;
		/// <summary>
		/// 
		/// </summary>
		public String Code
		{
			get { return code; }
			set
			{
				if (value != code)
				{
					MarkChanged("Code");
					code = value;
				}
			}
		}

		#endregion Fields and Properties

		#region Constructors

		public Course()
		{
		}

		#endregion Constructors

		#region Base overrides

		protected override void ValidationRules()
		{
		}

		protected override Course DataSelect(int id)
		{
			return Services.DALService.CourseService.Select(id);
		}

		protected override void DataUpdate()
		{
			Services.DALService.CourseService.Update(this);
		}

		protected override void DataInsert()
		{
			Services.DALService.CourseService.Insert(this);
		}

		protected override void DataDelete()
		{
			Services.DALService.CourseService.Delete(this);
		}

		#endregion Base overrides
	}
}
